namespace FanG
{
    using System;
    using System.ComponentModel;
    using System.Drawing;

    [TypeConverter(typeof(ExpandableObjectConverter))]
    public class LabelsAttributes : Attributes
    {
        private Font _UnitFont;
        private string _UnitText;
        private string _ValueFormat;

        public LabelsAttributes()
        {
            this._UnitText = "%";
            this._ValueFormat = "0.0";
            this._UnitFont = new Font("Arial", 12f, FontStyle.Regular, GraphicsUnit.Pixel);
        }

        public LabelsAttributes(string UnitText, string ValueFormat)
        {
            this._UnitText = "%";
            this._ValueFormat = "0.0";
            this._UnitFont = new Font("Arial", 12f, FontStyle.Regular, GraphicsUnit.Pixel);
            this.UnitText = UnitText;
            this.ValueFormat = ValueFormat;
        }

        public LabelsAttributes(string UnitText, string ValueFormat, Font UnitFont)
        {
            this._UnitText = "%";
            this._ValueFormat = "0.0";
            this._UnitFont = new Font("Arial", 12f, FontStyle.Regular, GraphicsUnit.Pixel);
            this.UnitText = UnitText;
            this.ValueFormat = ValueFormat;
            this.UnitFont = base.Font;
        }

        public LabelsAttributes(bool Show, Color ForeColor, Color BackColor, Font Font, string UnitText, string ValueFormat, Font UnitFont)
        {
            this._UnitText = "%";
            this._ValueFormat = "0.0";
            this._UnitFont = new Font("Arial", 12f, FontStyle.Regular, GraphicsUnit.Pixel);
            base.Show = Show;
            base.Font = Font;
            base.ForeColor = ForeColor;
            base.BackColor = BackColor;
            this.UnitText = UnitText;
            this.ValueFormat = ValueFormat;
            this.UnitFont = Font;
        }

        [Description("Fonts this unit text\n坐标轴单位文字的字体"), Category("Chartlet")]
        public Font UnitFont
        {
            get
            {
                return this._UnitFont;
            }
            set
            {
                this._UnitFont = value;
            }
        }

        [Category("Chartlet"), Description("Labels Unit\n坐标文字的单位")]
        public string UnitText
        {
            get
            {
                return this._UnitText;
            }
            set
            {
                this._UnitText = value;
            }
        }

        [Category("Chartlet"), Description("Text format for Y-label values\n纵坐标数值显示格式(用来控制小数位数)")]
        public string ValueFormat
        {
            get
            {
                return this._ValueFormat;
            }
            set
            {
                this._ValueFormat = value;
            }
        }
    }
}

